package com.sjlh.centurylianhua.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Sale {
    @TableId(value="saleId",type= IdType.AUTO)
    private Integer saleId;//销售id
    @TableField(value="saleNum")
    private Integer saleNum;//销售商品数量
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 存日期时使用
    @TableField(value="saleTime")
    private Data saleTime;//销售时间
    @TableField(value="saleTotal")
    private String saleTotal;//总金额
    @TableField(value="saleState")
    private String saleState;//状态  是否付款
    private String payment;//付款方式
    @TableField(value="userId")
    private Integer userId;//员工id,外键
    @TableField(value="customerId")
    private Integer customerId;//客户id，外键
    private String remarks1;//订单号
    private Integer remarks2;//备注2
    private String remarks3;//商品名称
}
